package com.epam.task.xml.classes;

import com.epam.task.xml.enums.Group;

import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: zhunusbekova.arailym
 * Date: 12.09.13
 * Time: 9:57
 * To change this template use File | Settings | File Templates.
 */
public class Medicine {
    private String name, factory;
    private List<Analog> analogs = new ArrayList<Analog>();
    private Release release = new Release();
    private Group group;
    private String uid;

    public Medicine() {

    }

    public Medicine(String name, String factory, Analog analogs, Release release, Group group, String uid) {
        this.name = name;
        this.factory = factory;
        this.analogs = (List<Analog>) analogs;
        this.release = release;
        this.group = group;
        this.uid = uid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFactory() {
        return factory;
    }

    public void setFactory(String factory) {
        this.factory = factory;
    }

    public List<Analog> getAnalogs() {
        return analogs;
    }

    public void setAnalogs(Analog analogs) {
        this.analogs = (List<Analog>) analogs;
    }

    public Release getRelease() {
        return release;
    }

    public void setRelease(Release release) {
        this.release = release;
    }

    public Group getGroup() {
        return group;
    }

    public void setGroup(Group group) {
        this.group = group;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String toString() {
        return "\nMedicine of group '" + group + "' with ID '" + uid + "'" + "\nName: " + name + "\nFactory: "+ factory
                + "\nAnalogs: "+ analogs.toString()  + "\nVersions: " + release.toString();
    }

}